-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add canonicalUrl to point to grafana.com/docs/k6 pages #1429
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spotted some 404s:
src/data/markdown/translated-guides/en/02 Using k6/10 Protocols/04 SSL-TLS/Online Certificate Status Protocol -OCSP-.md:canonicalUrl: https://grafana.com/docs/k6/latest/using-k6/protocols/ssl-tls/online-certificate-status-protocol-ocsp/
404
--
src/data/markdown/translated-guides/en/06 Test Types/00 Load test types.md:# canonicalUrl: https://grafana.com/load-testing/load-testing-types/
404
--
src/data/markdown/docs/40 xk6-disruptor/01 Get started/04 Expose Your Application.md:canonicalUrl: https://grafana.com/docs/k6/latest/testing-guides/injecting-faults-with-xk6-disruptor/expose-your-application/
404
--
src/data/markdown/docs/40 xk6-disruptor/02 Explanations/01 How it works.md:canonicalUrl: https://grafana.com/docs/k6/latest/testing-guides/injecting-faults-with-xk6-disruptor/how-it-works/
404
Here are some also interesting canonicals that might need double checking. I considered them interesting if they didn't point to a https://grafana.com/docs/k6/latest/ or https://grafana.com/docs/grafana-cloud/k6/ page:
src/data/markdown/translated-guides/en/08 Misc/04 k6 REST API.md:canonicalUrl: https://grafana.com/docs/k6
src/data/markdown/translated-guides/en/02 Using k6/17 HTTP debugging.md:canonicalUrl: https://grafana.com/docs/k6
src/data/markdown/translated-guides/en/02 Using k6/20 Workaround Iteration Duration.md:canonicalUrl: https://grafana.com/docs/k6
src/data/markdown/translated-guides/en/02 Using k6/19 Javascript Compatibility Mode.md:canonicalUrl: https://grafana.com/docs/k6
src/data/markdown/translated-guides/en/06 Test Types/01 Smoke Testing.md:# canonicalUrl: https://grafana.com/
src/data/markdown/translated-guides/en/06 Test Types/02 Load Testing.md:# canonicalUrl: https://grafana.com/
src/data/markdown/translated-guides/en/06 Test Types/07-breakpoint-testing.md:# canonicalUrl: https://grafana.com/
src/data/markdown/translated-guides/en/06 Test Types/05 Soak Testing.md:# canonicalUrl: https://grafana.com/
src/data/markdown/translated-guides/en/06 Test Types/03 Stress testing.md:# canonicalUrl: https://grafana.com/
src/data/markdown/translated-guides/en/06 Test Types/00 Load test types.md:# canonicalUrl: https://grafana.com/load-testing/load-testing-types/
src/data/markdown/translated-guides/en/Test Types.md:# canonicalUrl: https://grafana.com/
src/data/markdown/translated-guides/en/07 Testing Guides/03 Load testing websites.md:# canonicalUrl: https://grafana.com/
src/data/markdown/translated-guides/en/07 Testing Guides/01 API load testing.md:canonicalUrl: https://grafana.com/docs/k6
Seven canonicals are https://grafana.com/ and five go to 5 https://grafana.com/docs/k6
Mostly looks good to me!
In case it's useful, the script I used was: #!/usr/bin/env bash
IFS=$'\n'
for canonical in $(rg --no-heading canonicalUrl: src/data/markdown); do
echo "${canonical}"
url=${canonical##* }
curl -Ls -o /dev/null -w '%{http_code}\n' "${url}"
sleep 0.1
done And then I put the output into a file called $ # Find 404s.
$ grep '^4..$' -B 1 output.txt
$ # Find all canonicals that look unusual
$ grep -vE '([0-9]{3}|https://grafana.com/docs/(grafana-cloud/|k6/latest/).*)$' output.txt
$ # Count repeated canonicals
$ grep -o -E 'https://.*$' output.txt | sort | uniq -c | grep -v 1 |
Thanks @jdbaldry! For the 404s you mentioned, I opened a PR on the website repo to fix 3 of them, and one is a commented-out URL. For the other ones you found, a few of them are also set as comments until we have the new marketing pages up, and I removed a few of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for checking Heitor
Update canonical URL for all the k6.io/docs pages to point to the grafana.com/docs/k6 version.